home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.2
/
Video Toaster v4.2.iso
/
arexx
/
cg
/
batchloadpages.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-12-22
|
1KB
|
52 lines
/* BatchLoadPages.rexx V1.0 -- Load Pages in a directory. */
/* By Bob Caron (Grue) © 1995 NewTek, Inc. */
call remlib('rexxsupport.library')
call remlib(CG_AREXX)
call addlib(CG_AREXX,0)
call addlib("rexxsupport.library", 0,-30,0)
file=REQ_DIR("Load From Where?","Toaster:CG")
if file="" then call quit()
if lastpos('/',file,length(file)-1)~=0 then do
filenam=right(file,(length(file)-lastpos('/',file,length(file)-1)))
path=left(file,(lastpos('/',file,length(file))-1))
end
else do
filenam=right(file,(length(file)-lastpos(':',file,length(file)-1)))
path=left(file,(lastpos(':',file,length(file))))
end
if pragma('d',path||filenam)="" then file=path
else file=path||filenam
dir = showdir(path ,'f','*')
test=translate(dir,'?',' ','?')
test2=translate(test,' ','*',' ')
dir = test2
loopto=words(dir)
call req_tell(loopto)
loop=1
do while (loop<loopto+1)
frame=translate(word(dir,loop),' ','?')
if upper(right(frame,2))~=".I" then
call loadpage(path||"/"||frame,0)
loop=loop+1
end
call REQ_TELL("Done.")
call remlib('rexxsupport.library')
call remlib(CG_AREXX)
exit
quit: PROCEDURE
call remlib(CG_AREXX)
call remlib('rexxsupport.library')
exit